import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Index from "@/views/Index.vue";
import NotFound from "@/views/notfound.vue"
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "Index",
    component: Index,
    meta:{
      title:'跃跃'
    }
  },
  {
      path:'/home',
      name:'home',
      component:()=>import("@/views/Home.vue"),
      meta:{
        title:'功能页'
      }
  },
  {
    path:'/article',
    name:'article',
    component:()=>import("@/views/article.vue")
  },
  {
    path:'/music',
    name:'music',
    component:()=>import("@/views/music.vue")
  },
  {
    path:'/video',
    name:'video',
    component:()=>import("@/views/video.vue")
  },
  {
    path:'/collapse',
    name:'collapse',
    component:()=>import("@/views/dome/collapse.vue")
  },
  {
    path:'/tinder',
    name:'tinder',
    component:()=>import("@/views/dome/tinder.vue")
  },
  { path: '/:pathMatch(.*)*', name: 'not-found', component: NotFound },
];

const router = createRouter({
  history: createWebHashHistory(), //history模式: createWebHistory(process.env.BASE_URL) hash模式: createWebHashHistory()
  routes
});

export default router;
